//
//  ZHViewController.m
//  LBScoreView
//
//  Created by luckyBoyRoy@163.com on 09/01/2017.
//  Copyright (c) 2017 luckyBoyRoy@163.com. All rights reserved.
//

#import "ZHViewController.h"
#import "LBScoreView.h"
#import <Masonry.h>

@interface ZHViewController ()

@property (strong, nonatomic) LBScoreView *oneView;

@end

@implementation ZHViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    //test
    self.oneView = [[LBScoreView alloc]initWithOrigin:CGPointMake(50, 50) isSupportFloat:YES isEditor:YES starType:LBScoreViewStarTypeBig complete:^(CGFloat starNum) {
        NSLog(@"全部:%lf",starNum);
    }];
    [self.view addSubview:self.oneView];
    
    [self.oneView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(100);
        make.left.offset(100);
        make.size.mas_equalTo([LBScoreView sizeOfViewByStarType:LBScoreViewStarTypeBig]);
    }];
    
    self.oneView.backgroundColor = [UIColor orangeColor];
    
    
    
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    [self.oneView setScore:0.8 animation:YES];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
